package com.example.service.impl;


import com.example.entity.Orderform;
import com.example.mapper.OrderformMapper;
import com.example.service.IOrderformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tyhxzy
 * @since 2023-11-03
 */
@Service
public class OrderformServiceImpl  implements IOrderformService {
    @Autowired
    private OrderformMapper orderformMapper;

    @Override
    public  List<Map> findOrderformByStatus(Integer id,Integer status) {
        List<Map> orderformByStatus =orderformMapper.findOrderformByStatus(id,status);
        return orderformByStatus;
    }

    @Override
    public List<Map> findOrderformByName(Integer id,Integer status) {
        return orderformMapper.findOrderformByName(id,status);
    }

    @Override
    public Map findOrderformStatusById(Integer id) {
        return orderformMapper.findOrderformStatusById(id);
    }

    @Override
    public Map findOrderformNameById(Integer id) {
        return orderformMapper.findOrderformNameById(id);
    }

    @Override
    public int findSum(Integer id) {
        return orderformMapper.findSum(id);
    }

    @Override
    public Double findPrice(Integer id) {

        return orderformMapper.findPrice(id);
    }

    @Override
    public Orderform findOrderform(String writercoder) {
        return orderformMapper.findOrderformwritercodr(writercoder);
    }

    @Override
    public int updateWritercoder(Integer zid) {
        return orderformMapper.updateWritercodrInt(zid);
    }

    @Override
    public int insert(Orderform orderform) {
        return orderformMapper.insert(orderform);
    }
}
